<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		
		<script>
			$(function(){
				
				$("#username").keyup(function(){
					var username = $(this).val()
					console.log(username);
					$("#usernameInfo").html("长度"+username.length);
				});
				
			});
		

		
		</script>
	</head>
	<body>
		<h1>用户注册</h1>
		<form action="register" method="get">
			<table>
				<tr>
					<td>
						用户名
					</td>
					<td>
						<input type="text" name="username" id="username"/>
						<label id="usernameInfo"></label>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
